import React, { Component } from 'react';
import { NavLink, Route } from 'react-router-dom';
import { Button } from 'antd';
export default class img extends Component {
  render() {
    const { match } = this.props;
    const { path } = match;
    console.log(match);
    return (
      <div>
        <NavLink to={`${path}/gif`}>
          <Button></Button>
        </NavLink>
        <NavLink to={`${path}/hd`}>
          <Button></Button>
        </NavLink>
        <main>
          <Route path={`${path}/gif`} component={() => <div>动态图</div>} />
          <Route path={`${path}/hd`} component={() => <div>高清</div>} />
        </main>
      </div>
    );
  }
}
